/* jshint esversion: 6 */
const env = 'dev'

/*  全局的 path (api 接口js里面用到)*/
const path = {
  USERMANAGER_API: 'usermanager/',
  STOREWXTASK_API: 'storewxtask/',
  STOREPCTASK_API: 'storepctask/',
  TASKEXECUTIONINFO_API: 'taskexecutioninfo/',
  TASKSTOREDEPTDETAIL_API: 'taskstoredeptdetail/',
  TASKSTOREITEM_API: 'taskstoreitem/',
  TASKSTORETOTAL_API: 'taskstoretotal/',
  TASKPLAYBOOKFEEDBACK_API: 'taskplaybookfeedback/',
  TASKPLAYBOOKFEEDBACKRECORD_API: 'taskplaybookfeedbackrecord/',
  TASKEXECUTIONINFORECORD_API: 'taskexecutioninforecord/',
  TASKSTOREAUTHMANAGER_API: 'taskstoreauthmanager',
  TASKQA_API: 'taskqa',
  TASKGRADE_API: 'taskgrade/',
  SDO: 'sdoapi/',
  DM: 'dmapi/',
  HORO: 'horo/'
}

/*  全局的pageName */
const pageName = {
  TASTLIST: 'task_List',
  TASKINFO: 'task_Info',
  PREVIEWIMG: 'previewimg',
  TASKIMPLEMENTMATTERPLAYBOOKINFO: 'task_implementMatterPlaybookInfo',
  TASKIMPLEMENTMATTERPLAYBOOK: 'task_implementMatterPlaybook',
  TASKIMPLEMENTMATTERPLAYBOOKGOODSINFO: 'task_implementMatterPlaybook_goodsInfo',
  TASKIMPLEMENTMATTER: 'task_implementMatter',
  TASKGOODSLIST: 'task_goodsList',
  TASKFLOWEXETION: 'task_flowExetion',
  TASKADDGOODS: 'task_addgoods',
  TASKADDEXECUTION: 'task_addexecution',
  NOTICElIST: 'notice_List',
  DYNAMICLIST: 'dynamic_List',
  AGENTLIST: 'agent_List',
  PICKER: 'picker',
  VUESCROLL: 'vue-scroll',
  WPTXADDGOODS: 'wptx_addgoods',
  WPTXCHOOSEDEPARTMENT: 'wptx_choose_department',
  WPTXCHOOSEUSER: 'wptx_choose_user',
  WPTXCOMPLETETASK: 'wptx_completeTask',
  WPTXNAVDM: 'wptx_nav_dm',
  WPTXNAVSDO: 'wptx_nav_sdo',
  WPTXNAV: 'wptx_nav',
  WPTXPAGE: 'wptx_page',
  WPTXPREVIEW: 'wptxp_review',
  WPTXSELECTUSER: 'wptx_selectuser',
  WPTXTASKEXECUTIONCHOOSE: 'wptx_taskexecutionChoose',
  WPTXTASKLISKCHOOSE: 'wptx_taskLiskChoose',
  WPTXTASKSTORESTATCHOOSE: 'wptx_taskStoreStatChoose',
  WPTXTXUPLOAD: 'wptx_tx_upload',
  AUTUOLOGIN: 'autoLogin',
  WPTXQALIST: 'wptx_QAList',
  SDO: {
    PATH: '/sdo/',
    TASK: {
      LIST: 'SDO任务列表页',
      INFO: 'SDO任务详情',
      STAT: 'SDO任务执行状况',
      ITEM: 'SDOPlayBook商品列表'
    }
  },
  HORO: {
    PATH: '/horo/',
    TASK: {
      LIST: 'HORO任务列表页',
      INFO: 'HORO任务详情',
      STAT: 'HORO任务执行状况',
      ITEM: 'HOROlayBook商品列表'
    }
  },
  DM: {
    PATH: '/dm/',
    TASK: {
      LIST: 'DM任务列表页',
      INFO: 'DM任务详情',
      STAT: 'DM任务执行状况',
      ITEM: 'DMPlayBook商品列表'
    }
  },
  MA: "ma",
  COURSEWARE: "courseware",
  COURSE: "course",
  TRAIN: "train",
  STORE: "store",
  EMPLOYEE: "employee",
  SCHEDULE: "schedule",
  USERSCHEDULE: "userschedule",
  REPORT:"report"
}
/*  全局的router的active状态 */
const router = {
  ROOT: '/store/',
  MODULAR: {
    WPTXQALIST: 'wptx_QAList',
    TASKINFO: 'taskInfo',
    TASTLIST: 'taskList',
    DYNAMICLIST: 'dynamicList',
    NOTICElIST: 'noticeList',
    AGENTLIST: 'agentList',
    AUTUOLOGIN: 'autoLogin'
  },
  SDO: {
    ROOT: '/sdo/',
    TASK: {
      LIST: 'sdoTaskList',
      INFO: 'sdoTaskInfo',
      STAT: 'sdoTaskExeStat',
      ITEM: 'sdoTaskGoods'
    }
  },

  DM: {
    ROOT: '/dm/',
    TASK: {
      LIST: 'dmTaskList',
      INFO: 'dmTaskInfo',
      STAT: 'dmTaskExeStat',
      ITEM: 'dmTaskGoods'
    }
  },
  HORO: {
    ROOT: '/horo/',
    TASK: {
      LIST: 'horoTaskList',
      INFO: 'horoTaskInfo',
      STAT: 'horoTaskExeStat',
      ITEM: 'horoTaskGoods'
    }
  }
}

/*  分页的默认值 */
const page_common = {
  PAGE_SIZE: 10,
  PAGE_NO: 1
}

/*  通用的log的开关 */
// LOGLV: DEBUG=4;INFO=3;WARN=2;ERROR=1
const log_lv = 4

function forward(roter) {
  return router.ROOT + roter
}

export default {
  pageName: pageName,
  path: path,
  router: router,
  page_common: page_common,
  forward: forward,
  env: env,
  log_lv: log_lv
}
